package com.itheima;

import java.io.File;

public class Filetest {
    public static void main(String[] args) {
        File fl = new File("D:\\java");
        File[] files = fl.listFiles();
        File max = files[0];
        File min = files[0];
        for(File f : files){
            if(max.length()<files.length){
                max = f;
            } else if (min.length()>files.length) {
                min = f;
            }
        }
        System.out.println(max);
        System.out.println(min);
    }
}
